package javacore.Statements;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class DoWhile {

	
	public static void main(String[] args) throws java.io.IOException {
		
		char choice;
	    do {
	      System.out.println("Help on:");
	      System.out.println(" 1. Call to Sales");
	      System.out.println(" 2. Call to technical Support");
	      System.out.println(" 3. Call for General Information");
	      System.out.println("Choose one:");
	      choice = getChar();
	    } while (choice < '1' || choice > '3');
	    System.out.println("\n");
	    switch (choice) {
	      case '1':
	        System.out.println("Call to Sales being forwarded...");
	        break;
	      case '2':
	        System.out.println("Call to technical Support being forwarded...");
	        break;
	      case '3':
	        System.out.println("We will contact you, thanks");
	        break;
	      default:
	    	  System.out.println("Invalid choice");
	    }
	}
	
	static char getChar() throws java.io.IOException{
		
		BufferedReader br = new BufferedReader(new 
                InputStreamReader(System.in));
		char c = (char) br.read();
		
		return c;
		
	}

}
